package com.syt.mina.session;

import java.util.Map;

import org.apache.mina.core.session.IoSession;

import com.syt.mina.message.IMessage;

public interface ISessionManager {
	String ATTRIBUTE_SESSION_MANAGE = ISessionManager.class.getName() + ".sessionManage";
	
	void addSession(IoSession session);
	void deleteSession(IoSession session);
	void exceptionCaught(IoSession session, Throwable cause) throws Exception;

	Map<String,IoSession> getAllSession();
	
	void broadcastMessage(IMessage message);
	void sendMessageTo(IoSession session, IMessage message);
	void sendMessageTo(String key, IMessage message);
	boolean isDispach(IoSession session, Object message);
	
}
